/**
 * 
 */
package com.xbang.core;

/**
 * BusinessException which is a kind of RuntimeException and can be represented as a base exception for all business exceptions.
 * 
 * @author dev.zhang
 */
public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 3723080597120815995L;

	private String errorMessage;
	
	private String target;
	
	/**
	 * The default constructor
	 */
	public BusinessException() {

	}

	/**
	 * The constructor using message
	 * 
	 * @param message
	 */
	public BusinessException(String message) {
		this.errorMessage = message;
	}

	/**
	 * The constructor using message and target
	 * 
	 * @param message
	 * @param target
	 */
	public BusinessException(String message, String target) {
		this.errorMessage = message;
		this.target = target;
	}
	
	/**
	 * @return the errorMessage
	 */
	public String getErrorMessage() {
		return errorMessage;
	}
	
	/**
	 * @return the target
	 */
	public String getTarget() {
		return target;
	}

}
